package com.itheima;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author 斌叔
 * @description:
 * @create 2022-05-14 1:04
 */
@SpringBootApplication
@EnableDiscoveryClient  // 开启服务发现
//@EnableFeignClients(basePackages = "com.itheima.service")  //开启feign
//@ComponentScan(basePackages = "com.itheima.*")    //扫描包
public class ProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(ProductApplication.class, args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
